/**
  ******************************************************************************
  * @file    mcx314.h
  * @author  yan  
  * @version 1.0
  * @date    2016-12-02
  * @brief   
  ******************************************************************************
	*/
  
  
  
#ifndef __MCX314_H_
#define __MCX314_H_

#include <rtthread.h>

/*------------------cmd------------------*/
#define MCX314_CTRL_COMMAND   0U
#define MCX314_CTRL_WREG1     1U  
#define MCX314_CTRL_WREG2     2U
#define MCX314_CTRL_WREG3     3U
#define MCX314_CTRL_RANGE     4U
#define MCX314_CTRL_ACAC      5U
#define MCX314_CTRL_ACC       6U
#define MCX314_CTRL_DEC       7U
#define MCX314_CTRL_STARTV    8U
#define MCX314_CTRL_SPEED     9U
#define MCX314_CTRL_PULSE     10U
#define MCX314_CTRL_DECP      11U
#define MCX314_CTRL_CENTER    12U
#define MCX314_CTRL_LP        13U
#define MCX314_CTRL_EP        14U
#define MCX314_CTRL_COMPP     15U
#define MCX314_CTRL_COMPM     16U
#define MCX314_CTRL_ACCOFST   17U
#define MCX314_CTRL_WAIT      18U
#define MCX314_CTRL_NEXT_WAIT 19U
#define MCX314_CTRL_BP_WAIT   20U
#define MCX314_CTRL_TEST      21U
#define MCX314_CTRL_HOMESRCH  22U

#define	MCX314_X		0x01			//Axis code for axis X
#define	MCX314_Y		0x02			//Axis code for axis Y
#define MCX314_XY		0x03
#define	MCX314_Z		0x04			//Axis code for axis Z
#define	MCX314_U		0x08			//Axis code for axis U
#define	MCX314_ALL	    0x0f			//Axis code for all axes (X, Y, Z and U) 

typedef struct{
  rt_uint32_t axis;
  rt_uint32_t speed;
}mcx314_SpeedType;

typedef struct{
  rt_uint32_t axis;
  rt_uint32_t cmd;
}mcx314_CmdType;

struct rt_mcx314_device
{
  struct rt_device          parent;
  
    
  
};

void rt_hw_mcx314_init(void);

#endif


